package zhang.hao.jia.utils;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.client.RestTemplate;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication
@EnableTransactionManagement
@EnableScheduling
@EnableAsync
@EnableSwagger2
@MapperScan(basePackages = {"tianrun.ziguan.api.power.dao"})
public class PowerApplication {

    public static void main(String[] args) {
        new SpringApplicationBuilder(PowerApplication.class).run(args);
    }
    /**
     * 创建restTemplate
     */
    @Bean
    public RestTemplate createRestTemplate() {
        return new RestTemplate();
    }

}
